From d8f44c06e8cd417b4a0d1861f06ea68c49cb0fbd Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 29 Apr 2021 11:09:04 -0400 Subject: [PATCH] ci: Add MSVC build This script is copied from glib CI. --- .gitlab-ci.yml | 16 ++++++++++++++++ .gitlab-ci/test-msvc.bat | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .gitlab-ci/test-msvc.bat diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59dc2e6fec..5ded2c02f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -172,6 +172,22 @@ macos: paths: - "${CI_PROJECT_DIR}/_build/meson-logs" +vs2017-x64: + extends: .only-default + # TODO: Uncomment this when ready to merge. + #only: + # - branches@GNOME/gtk + stage: build + tags: + - win32-ps + needs: [] + script: + - .gitlab-ci/test-msvc.bat + artifacts: + when: always + paths: + - "${CI_PROJECT_DIR}/_build/meson-logs" + .flatpak-defaults: image: $FLATPAK_IMAGE stage: flatpak diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat new file mode 100644 index 0000000000..294e9480df --- /dev/null +++ b/.gitlab-ci/test-msvc.bat @@ -0,0 +1,14 @@ +@echo on +:: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the +:: specified build architecture +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64 +@echo on + +:: FIXME: make warnings fatal +pip3 install --upgrade --user meson==0.56.2 || goto :error +meson _build || goto :error +ninja -C _build || goto :error + +goto :EOF +:error +exit /b 1 -- 2.30.2